﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.ServiceProcess;

namespace xTrackEmailer_Service
{
    [RunInstaller(true)]
    public partial class xTrackEmailerServiceInstaller : Installer
    {
        public xTrackEmailerServiceInstaller()
        {
            InitializeComponent();
            ServiceProcessInstaller serviceProcessInstaller =
                new ServiceProcessInstaller();
            ServiceInstaller serviceInstaller =
                new ServiceInstaller();

            serviceProcessInstaller.Account = ServiceAccount.LocalService;

            serviceInstaller.ServiceName = "xTrackEmailerServiceInstaller";
            serviceInstaller.StartType = ServiceStartMode.Automatic;

            serviceInstaller.ServiceName = "xTrackEmailerServiceInstaller";
            this.Installers.Add(serviceProcessInstaller);
            this.Installers.Add(serviceInstaller);
        }
    }
}
